/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dca.sistemascontrole.dao;

import dca.sistemascontrole.domain.DataObject;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import org.jfree.data.time.FixedMillisecond;

/**
 *
 * @author Rafael
 */
public class GraphicDataManager implements Serializable {

    private List<DataObject> nivelSinalControle = new ArrayList<DataObject>();
    private List<DataObject> nivelTanqueInferior = new ArrayList<DataObject>();
    private List<DataObject> nivelTanqueSuperior = new ArrayList<DataObject>();

    public void addSinalControle(double value) {
        long currentTimeMillis = System.currentTimeMillis();

        nivelSinalControle.add(new DataObject(value, new FixedMillisecond(currentTimeMillis)));
    }

    public void addTanqueInferior(double value) {
        long currentTimeMillis = System.currentTimeMillis();

        nivelTanqueInferior.add(new DataObject(value, new FixedMillisecond(currentTimeMillis)));
    }

    public void addTanqueSuperior(double value) {
        long currentTimeMillis = System.currentTimeMillis();

        nivelTanqueSuperior.add(new DataObject(value, new FixedMillisecond(currentTimeMillis)));
    }

    public void clear() {
        nivelSinalControle.clear();
        nivelTanqueInferior.clear();
        nivelTanqueSuperior.clear();
    }

    public List<DataObject> getNivelSinalControle() {
        return nivelSinalControle;
    }

    public List<DataObject> getNivelTanqueInferior() {
        return nivelTanqueInferior;
    }

    public List<DataObject> getNivelTanqueSuperior() {
        return nivelTanqueSuperior;
    }
}
